package net.bplaced.streetfighter.lib.async.task;

import net.bplaced.streetfighter.lib.model.GoalGetter;
import net.bplaced.streetfighter.lib.service.GoalGetterServiceImpl;
import net.bplaced.streetfighter.lib.utils.CallBack;
import net.bplaced.streetfighter.lib.utils.ServiceReturnPackage;
import android.content.Context;

/**
 * @author Sebastian Hoffmann <bo.hoffi@googlemail.com>
 */
public class GoalGetterLoaderTask
        extends AbstractLoaderTask<String, ServiceReturnPackage<GoalGetter[]>> {

    public GoalGetterLoaderTask(Context context, String progressMessage,
            CallBack<ServiceReturnPackage<GoalGetter[]>> onFinished) {

        super(context, progressMessage, onFinished);
    }

    @Override
    ServiceReturnPackage<GoalGetter[]> performInBackground(String... params) {

        if (params.length != 0) {
            return null;
        }

        return new GoalGetterServiceImpl().loadGoalGetterViaPOST();
    }
}